Repository navigation
python-sdk: remove loaded entrypoints with sdk-helpers - #90
Merged
Merged
Conversation
Signed-off-by: Yves Brissaud <yves@dagger.io>
sdk-helpers v1.0.10 adds ModuleManifest.withoutEntrypoint, which drops a loaded entrypoint and keeps every other loaded field. Generation now loads the manifest as written and removes the entrypoint there, instead of cutting the [entrypoint] table out of the file first. The two generation sites that used to cut a replaced entrypoint no longer need to: a manifest with its own runtime and an entrypoint is refused before loading, and every other entrypoint generation replaces is overwritten by withDangEntrypoint. With no caller left, the pyproject helper's remove-table command goes. Signed-off-by: Yves Brissaud <yves@dagger.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps sdk-helpers to v1.0.10 and uses its new
ModuleManifest.withoutEntrypoint(dagger/sdk-helpers#16). The[entrypoint]table is no longer cut out ofdagger-module.tomlwith the Go helper'sremove-tablebefore loading.chore: use sdk-helpers v1.0.10changesdagger-module.tomlanddagger.lockonly, like the v1.0.9 bump.mod.dangstaging and the move onto the SDK runtime now load the manifest and call.withoutEntrypoint.withoutReplacedEntrypointis removed, because it never changed the output:checkOneRunneralready refuses any entrypoint.withDangEntrypoint.ManifestToml.withoutEntrypoint,PyprojectHelper.withoutTable, and the Goremove-tablecommand and its tests.Generated manifests are unchanged for a regular
[entrypoint]table. Two edge cases now behave differently:source = 123, now fails withload dagger-module.toml: ...instead of being dropped. The engine already rejects such a table in the version 2 manifest format.Overlaps:
mod.dangstaging lines right below the ones this PR collapses. Resolve by keeping both changes.withoutTableandremove-table. Whichever lands second drops them.Checks, run one at a time with
dagger check -m .dagger/modules/e2e <name>on CLI and enginev1.0.0-beta.25, all pass:entrypoint-manifest-check, static-scope-init-check, static-types-load-check, linked-entrypoint-config-check, generate-scope-init-check, legacy-runtime-check.
Negative controls confirm the new code runs: without
.withoutEntrypoint, static-types-load-check and legacy-runtime-check fail.go vetandgo test ./...pass inhelpers/pyproject.